#ifndef PARAFLUIDSPHNEIGHBOR_H
#define PARAFLUIDSPHNEIGHBOR_H

#include "parafluidatomvoxelizer.h"

#include <QSet>

namespace ParaFluid
{
	
	class NeighborhoodReadOnlyVisitor
		: public AtomVoxelizer::ReadOnlyVisitor
	{
		
	public:
		
		virtual ~NeighborhoodReadOnlyVisitor();
		
		NeighborhoodReadOnlyVisitor();
		
		void visitNeighborhood(SPH & sph, const Atom & atom);
		
		void visit(const Atom & value);
		
		virtual void visitNeighbor(const Atom & atom) = 0;
		
	private:
		
		mutable QSet<const Atom *> * _visited;
		
		const Atom * _atom;
		
		SPH * _SPH;
		
		NeighborhoodReadOnlyVisitor(const NeighborhoodReadOnlyVisitor & other);
		
		NeighborhoodReadOnlyVisitor & operator= (const NeighborhoodReadOnlyVisitor & rhs);
		
	};
	
}

#endif
